#!/usr/bin/env python
# -*- coding: utf-8 -*-

from threading import local

_t = local()


def t():
    return getattr(_t, 'u')

class T:
    
    _t.u = 'Ok'
    
    print _t.u, 'Thread local in class '
    
T()